
import { Typography, List, Radio} from 'antd'
import prices  from '../../helpers/price'

const {Title} = Typography

function FilterByPrice ({handelFilter}) {

    const handleOnChange = value => {

        handelFilter(value.target.value)
    }
    return (
        <>
            <Title level={5}>按照价格筛选</Title>
            <Radio.Group onChange={handleOnChange}>
            <List
                dataSource={prices}
                renderItem={item => (
                    <List.Item>
                        <Radio value={item.array}>
                        {item.name}
                        </Radio>
                    </List.Item>
                )}
            />
            </Radio.Group>
            
        </>
    )
}
export default FilterByPrice